﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 游戏平台原型
{
    public partial class Form_AddPanel : Form
    {
        private ChangePanelStateHandler m_changepanelstate;
        int currentpanelid;
        public Form_AddPanel(int id, ChangePanelStateHandler changepanelstate)
        {
            m_changepanelstate = changepanelstate;
            currentpanelid = id;
            InitializeComponent();
        }

        private void btn_addpanel_ok_Click(object sender, EventArgs e)
        {
            User.user.currentroom.AddPanel(currentpanelid, cb_addroom_paneltype.Text);
            m_changepanelstate(currentpanelid, cb_addroom_paneltype.Text);
            this.Close();
        }
    }
}
